"use strict";function nasa_load_ajax_funcs(a){a("body").trigger("nasa_after_ajax_funcs"),a("body").trigger("nasa_compatible_jetpack"),a("body").trigger("nasa_after_ajax_funcs")}function nasa_compatible_jetpack(a){a(".jetpack-lazy-image").length&&a(".jetpack-lazy-image").removeAttr("srcset").removeAttr("data-lazy-src").removeClass("jetpack-lazy-image")}function loading_slick_element(a,t,e,n){var s="undefined"!=typeof n?n:!1,i=s?".right-now .nasa-slick-slider":".nasa-slick-slider",d="undefined"!=typeof e&&a(e).length?a(e).find(i):a(i);if(a(d).length){a("body").trigger("nasa_compatible_jetpack");var r=a("body").hasClass("nasa-rtl")?!0:!1,o="undefined"==typeof t?!1:t;a(d).each(function(){var t=a(this);if(o&&a("body").trigger("nasa_unslick",[t]),a(t).find(".nasa-slick-remove").length&&a(t).find(".nasa-slick-remove").remove(),!a(t).hasClass("slick-initialized")){var e=parseInt(a(t).attr("data-columns")),n=parseInt(a(t).attr("data-columns-small")),s=parseInt(a(t).attr("data-columns-tablet")),i="true"===a(t).attr("data-autoplay")?!0:!1,d="true"===a(t).attr("data-loop")?!0:!1,l=parseInt(a(t).attr("data-speed")),c=parseInt(a(t).attr("data-delay")),p="true"===a(t).attr("data-dot")||"true"===a(t).attr("data-dots")?!0:!1,f="true"===a(t).attr("data-height-auto")?!0:!1,u=a(t).attr("data-padding"),h=a(t).attr("data-padding-small"),_=a(t).attr("data-padding-medium"),g="true"===a(t).attr("data-disable-drag")?!1:!0,m="true"===a(t).attr("data-slides-all")?!0:!1,v=parseInt(a(t).attr("data-start"));e=e?e:4,n=n?n:2,s=s?s:3;var b=m?e:1,w=m?n:1,C=m?s:1;l=l?l:300,c=c?c:6e3,v=v?v:0;var y={rtl:r,slidesToShow:e,slidesToScroll:b,autoplay:i,infinite:d,autoplaySpeed:c,speed:l,initialSlide:v,adaptiveHeight:f,dots:p,swipe:g,draggable:g,pauseOnHover:!0,arrows:!0,touchThreshold:10,cssEase:"ease-out",prevArrow:'',nextArrow:''};r||(y.swipeToSlide=!0);var k=768,x=1130;a(t).attr("data-switch-tablet")&&(k=parseInt(a(t).attr("data-switch-tablet"))),a(t).attr("data-switch-desktop")&&(x=parseInt(a(t).attr("data-switch-desktop")));var j={slidesToShow:s,slidesToScroll:C},T={slidesToShow:n,slidesToScroll:w};u&&(y.centerMode=!0,y.centerPadding=u,y.infinite=!0,a(t).hasClass("nasa-center-mode")||a(t).addClass("nasa-center-mode")),h?(T.centerMode=!0,T.centerPadding=h,T.infinite=!0,a(t).hasClass("nasa-small-center-mode")||a(t).addClass("nasa-small-center-mode")):T.centerMode=!1,_?(j.centerMode=!0,j.centerPadding=_,j.infinite=!0,a(t).hasClass("nasa-medium-center-mode")||a(t).addClass("nasa-medium-center-mode")):j.centerMode=!1;var I=[{breakpoint:x,settings:j},{breakpoint:k,settings:T}];if(a(t).attr("data-switch-custom"))var S=parseInt(a(t).attr("data-switch-custom")),A={slidesToShow:1,slidesToScroll:1};S&&I.push({breakpoint:S,settings:A}),y.responsive=I,a(t).slick(y),a(t).find(".nasa-banner-image").length&&a(t).find(".slick-slide").each(function(){var t=a(this);if(a(t).find(".banner-inner").length>0){var e=a(t).find(".banner-inner"),n=a(e).attr("data-animation");a(e).removeClass("animated").removeClass(n).removeAttr("style"),a(t).hasClass("slick-active")&&setTimeout(function(){a(e).show(),a(e).addClass("animated").addClass(n).css({visibility:"visible","animation-duration":"1s","animation-delay":"0ms","animation-name":n})},1e3)}}),setTimeout(function(){a("body").trigger("nasa_inited_slick",[t])},100)}})}}function load_count_down(a){"undefined"!=typeof nasa_countdown_l10n&&a(".countdown").length>0&&a(".countdown").each(function(){var t=a(this);if(!a(t).hasClass("countdown-loaded")){var e=new Date(t.data("countdown"));a(t).countdown({until:e,padZeroes:!0}),a(t).hasClass("pause")&&a(t).countdown("pause"),a(t).addClass("countdown-loaded")}})}function nasa_loop_through_variations(a,t,e,n){null!==t&&a(t).each(function(){var t=a(this),s=a(t).hasClass("nasa-attr_type_custom")?"attribute_":"attribute_pa_",i=s+a(t).attr("data-pa_name");a(t).find(".nasa-attr-ux-item").removeClass("nasa-disable"),a(t).find(".nasa-attr-ux-item").removeClass("nasa-unavailable"),a(t).find(".nasa-attr-ux-item").removeClass("attached"),a(t).find(".nasa-attr-ux-item").removeClass("enabled");var d=a.extend(!0,{},e);d[i]="";var r=nasa_matching_variations(n,d);for(var o in r)if("undefined"!=typeof r[o]){var l=r[o].attributes;for(var c in l)if(l.hasOwnProperty(c)){var p=l[c],f="";if(p=p?a("
").html(p).text():!1,c===i)if(r[o].variation_is_active&&(f=" enabled"),p){var u=a(t).find(".nasa-attr-ux-item");u.length&&u.each(function(){var t=a(this),e=t.attr("data-value");return p===e?(t.addClass("attached"+f),void 0):void 0})}else a(t).find(".nasa-attr-ux-item").addClass("attached"+f)}}a(t).find(".nasa-attr-ux-item:not(.attached)").length&&a(t).find(".nasa-attr-ux-item:not(.attached)").addClass("nasa-disable"),a(t).find(".nasa-attr-ux-item:not(.enabled)").length&&a(t).find(".nasa-attr-ux-item:not(.enabled)").addClass("nasa-unavailable")})}function change_content_product_variable(a,t,e){e="undefined"==typeof e?!1:e;var n=a(t).find(".nasa-product-content-child").length,s=a(t).find(".nasa-product-content-child .nasa-active").length,i=a(t).parents(".product-item");if(a(i).find('.main-img [type="image/webp"]').length){var d=a(i).find(".main-img img").eq(0).clone();a(i).find(".main-img").html(""),a(i).find(".main-img").append(d)}var r=a(i).find(".main-img img").eq(0);a(r).length<=0&&(r=a(i).find(".product-img-wrap img").eq(0));var o=a(r).attr("data-org_img"),l=a(i).find(".back-img img"),c=a(l).length?a(l).attr("data-org_img"):"",p=a(i).find(".add-to-cart-grid:not(.nasa-quick-add)"),f=n?a(t).find(".nasa-product-content-child"):null,u=a(r).attr("srcset"),h=a(l).length?a(l).attr("srcset"):"",_=a(r).attr("data-srcset"),g=a(l).length?a(l).attr("data-srcset"):"",m=JSON.parse(a(t).attr("data-product_variations")),v=nasa_chosen_attrs(a,t),b=v.data,w=a(i).find(".price");if(a(w).length&&a(i).find(".price").each(function(){a(this).parents(".price-wrap").length<=0&&a(this).parents(".nasa-org-price").length<=0&&a(this).wrap('
')}),a(i).hasClass("outofstock")||a(i).find(".badge.out-of-stock-label").remove(),nasa_loop_through_variations(a,f,b,m),a(t).parents(".nasa-bought-together-wrap").length){var C=a(t).parents(".nasa-accessories-product"),y=a(".nasa-accessories-check").find('.nasa-accessories-item-check input[value="'+a(C).attr("data-product-id")+'"]'),k=nasa_matching_variations(m,b);a(y).attr({"data-display_price":k[0].display_price,"data-display_regular_price":k[0].display_regular_price}),setTimeout(function(){k.length>1?a(y).addClass("ns-getmin"):a(y).removeClass("ns-getmin"),a(y).trigger("change")},10)}if(a(i).find(".nasa-org-price.hidden-tag").length<=0&&a(i).find(".price-wrap").length){var x=a(i).find(".price-wrap").eq(0);a(x).after('
'+a(x).html()+"
")}a(p).hasClass("nasa-variable-add-to-cart-in-grid")&&"undefined"==typeof a(t).attr("data-select_text")&&a(t).attr("data-select_text",a(p).find(".add_to_cart_text").html());var j=a(t).attr("data-select_text");if(a(t).hasClass("ns-modern-8-content-variable-warp")&&a(t).find(".nasa-product-content-child").each(function(){var t=a(this),e=a(this).find(".nasa-attr-ux-item.nasa-active"),n=a(t).find(".ns-attr-ux-title").attr("data-text");if(a(e).length){var s=a(e).attr("data-name");a(e).parents(".nasa-product-content-select-wrap").length&&(s=a(e).attr("data-value")),a(t).find(".ns-attr-ux-title").text(n+": "+s)}else a(t).find(".ns-attr-ux-title").text(n)}),n!==s)return"undefined"!=typeof o&&(a(r).attr("src",o),_&&a(r).attr("srcset",_)),a(l).length&&"undefined"!=typeof c&&(a(l).attr("src",c),g&&a(l).attr("srcset",g)),a(p).hasClass("nasa-variable-add-to-cart-in-grid")&&!a("body").hasClass("nasa-ywraq-hide-add-to-cart")&&(a(p).find(".add_to_cart_text").html(j),a(p).attr("title",j),a(p).hasClass("nasa-tip")&&(a(p).attr("data-tip",j),a(p).find(".nasa-tip-content").length&&a(p).find(".nasa-tip-content").html(j)),a(p).attr("data-product_id",a(t).attr("data-product_id")).addClass("product_type_variable").removeClass("product_type_variation").removeAttr("data-variation")),a(i).find(".price-wrap").html(a(i).find(".nasa-org-price").html()),a(i).find(".add-to-cart-grid").removeClass("nasa-active"),a(i).removeClass("product-deals"),a(i).find(".nasa-sc-pdeal-countdown").hasClass("hidden-tag")||a(i).find(".nasa-sc-pdeal-countdown").addClass("hidden-tag"),a(i).find(".nasa-sc-pdeal-countdown").html(""),a(i).find(".nasa-badges-wrap .bulk-label").remove(),void 0;var T=[],I={};a(t).find(".nasa-product-content-child .nasa-active").each(function(){var t=a(this),e=a(t).parents(".nasa-product-content-child").hasClass("nasa-attr_type_custom")?"attribute_":"attribute_pa_",n=e+a(t).attr("data-pa"),s=a(t).attr("data-value"),i={key:n,value:s};I[n]=s,T.push(i)});var S=!1,A=null;for(var M in m){var q=m[M].attributes,z=0;for(var O in q)z++;if(n!==z)break;for(var P in T){if(""!==q[T[P].key]&&q[T[P].key]!==T[P].value){S=!1;break}S=!0}if(S){A=m[M];break}}if(A){var B=o?o:a(r).attr("src"),D="";if("undefined"!=typeof A.image_catalog&&(D=A.image_catalog),"undefined"!=typeof A.image_catalog&&""!==A.image_catalog&&D!==B?("undefined"==typeof o&&a(r).attr("data-org_img",a(r).attr("src")),a(l).length&&"undefined"==typeof c&&a(l).attr("data-org_img",a(l).attr("src")),a(r).attr("src",A.image_catalog),a(l).length&&("undefined"!=typeof A.nasa_variation_back_img&&""!==A.nasa_variation_back_img?a(l).attr("src",A.nasa_variation_back_img):a(l).attr("src",A.image_catalog)),u&&(a(r).removeAttr("srcset"),a(r).attr("data-srcset",u)),a(l).length&&h&&(a(l).removeAttr("srcset"),a(l).attr("data-srcset",h)),nasa_img_is_loaded(a,r,l,A.variation_id)):("undefined"!=typeof o&&(a(r).attr("src",o),_&&a(r).attr("srcset",_)),a(l).length&&"undefined"!=typeof c&&(a(l).attr("src",c),g&&a(l).attr("srcset",g))),A.price_html?a(i).find(".price-wrap").html(A.price_html):a(i).find(".price-wrap").html(a(i).find(".nasa-org-price").html()),a(i).find(".wcpbc-price.loading").length&&a(i).find(".wcpbc-price.loading").removeClass("loading"),A.outofstock_badge&&!a(i).hasClass("outofstock")&&(a(i).find(".nasa-badges-wrap").length<1&&a(i).find(".product-img-wrap").prepend('
'),a(i).find(".nasa-badges-wrap").append(A.outofstock_badge)),A.variation_id&&A.is_in_stock&&A.variation_is_visible&&A.is_purchasable){if(a(p).hasClass("nasa-variable-add-to-cart-in-grid")&&!a("body").hasClass("nasa-ywraq-hide-add-to-cart")){var H="undefined"!=typeof A.add_to_cart_txt?A.add_to_cart_txt:a('input[name="add_to_cart_text"]').val();a(p).find(".add_to_cart_text").html(H),a(p).attr("title",H),a(p).hasClass("nasa-tip")&&(a(p).attr("data-tip",H),a(p).find(".nasa-tip-content").length&&a(p).find(".nasa-tip-content").html(H)),a(i).find(".add-to-cart-grid").each(function(){var t=a(this);a(t).hasClass("nasa-active")||a(t).addClass("nasa-active")})}var J={};for(var N in A.attributes)J[N]=I[N];if(a(p).hasClass("nasa-variable-add-to-cart-in-grid")&&!a("body").hasClass("nasa-ywraq-hide-add-to-cart")&&a(p).attr("data-product_id",A.variation_id).removeClass("product_type_variable").addClass("product_type_variation").attr("data-variation",JSON.stringify(J)),"undefined"!=typeof A.deal_time&&A.deal_time){var W=!0,E=new Date,F=E.getTime();if("undefined"!=typeof A.deal_time.from&&A.deal_time.from>F&&(W=!1),W&&A.deal_time.to
');var G=a(i).find(".nasa-badges-wrap");a(G).find(".bulk-label").length<=0&&a(G).append(A.nasa_custom_fields.dsct_badge)}else a(i).find(".nasa-badges-wrap .bulk-label").remove()}else a(p).hasClass("nasa-variable-add-to-cart-in-grid")&&(a(p).find(".add_to_cart_text").html(j),a(p).attr("title",j),a(p).attr("data-product_id",a(t).attr("data-product_id")).addClass("product_type_variable").removeClass("product_type_variation").removeAttr("data-variation"),a(p).hasClass("nasa-tip")&&(a(p).attr("data-tip",j),a(p).find(".nasa-tip-content").length&&a(p).find(".nasa-tip-content").html(j)),a(i).find(".add-to-cart-grid").removeClass("nasa-active")),a(i).removeClass("product-deals"),a(i).find(".nasa-sc-pdeal-countdown").hasClass("hidden-tag")||a(i).find(".nasa-sc-pdeal-countdown").addClass("hidden-tag"),a(i).find(".nasa-sc-pdeal-countdown").html(""),a(i).find(".nasa-badges-wrap .bulk-label").remove();a(i).find(".nasa-close-variants").length&&a(i).find(".nasa-close-variants").trigger("click")}else if("undefined"!=typeof o&&(a(r).attr("src",o),_&&a(r).attr("srcset",_)),a(l).length&&"undefined"!=typeof c&&(a(l).attr("src",c),g&&a(l).attr("srcset",g)),a(p).hasClass("nasa-variable-add-to-cart-in-grid")&&!a("body").hasClass("nasa-ywraq-hide-add-to-cart")&&(a(p).find(".add_to_cart_text").html(j),a(p).attr("title",j),a(p).hasClass("nasa-tip")&&(a(p).attr("data-tip",j),a(p).find(".nasa-tip-content").length&&a(p).find(".nasa-tip-content").html(j)),a(p).attr("data-product_id",a(t).attr("data-product_id")).addClass("product_type_variable").removeClass("product_type_variation").removeAttr("data-variation"),a(i).find(".add-to-cart-grid").removeClass("nasa-active")),a(i).find(".price-wrap").html(a(i).find(".nasa-org-price").html()),a(i).removeClass("product-deals"),a(i).find(".nasa-sc-pdeal-countdown").hasClass("hidden-tag")||a(i).find(".nasa-sc-pdeal-countdown").addClass("hidden-tag"),a(i).find(".nasa-sc-pdeal-countdown").html(""),a(i).find(".nasa-badges-wrap .bulk-label").remove(),e){var K="undefined"!=typeof wc_add_to_cart_variation_params?wc_add_to_cart_variation_params.i18n_no_matching_variations_text:a('input[name="nasa_no_matching_variations"]').val();window.alert(K)}}function nasa_img_is_loaded(a,t,e,n){if(-1===img_loaded_array.indexOf(n)){var s=a(t).parents(".main-img"),i=a(e).length?a(e).parents(".back-img"):null;if(a(s).length||i){a(s).length&&!a(s).hasClass("nasa-img-loading")&&a(s).addClass("nasa-img-loading"),i&&!a(i).hasClass("nasa-img-loading")&&a(i).addClass("nasa-img-loading");var d=setInterval(function(){_main_loaded=!1;var e=a(t).attr("src"),n=new Image;n.onload=function(){_main_loaded=!0,clearInterval(d)},n.src=e},100),r=setInterval(function(){if(a(i).length){if(_main_loaded){_back_loaded=!1;var t=a(e).attr("src"),s=new Image;s.onload=function(){_back_loaded=!0,check_img_loaded=1,img_loaded_array.push(n),nasa_img_clear_loaded(a),clearInterval(r)},s.src=t}}else _main_loaded&&(check_img_loaded=1,img_loaded_array.push(n),nasa_img_clear_loaded(a),clearInterval(r))},100)}}}function nasa_img_clear_loaded(a){"undefined"!=typeof check_img_loaded&&0!=check_img_loaded&&(a(".product-item .main-img.nasa-img-loading").length&&a(".product-item .main-img.nasa-img-loading").removeClass("nasa-img-loading"),a(".product-item .back-img.nasa-img-loading").length&&a(".product-item .back-img.nasa-img-loading").removeClass("nasa-img-loading"),check_img_loaded=0)}function nasa_chosen_attrs(a,t){var e={},n=0,s=0;return a(t).find(".nasa-product-content-child").each(function(){var t=a(this).hasClass("nasa-attr_type_custom")?"attribute_":"attribute_pa_",i="",d=0;a(this).find(".nasa-attr-ux-item").each(function(){0===d&&(t+=a(this).attr("data-pa")),a(this).hasClass("nasa-active")&&(i=a(this).attr("data-value")),d++}),i.length>0&&s++,n++,e[t]=i}),{count:n,chosenCount:s,data:e}}function nasa_isMatch_variation(a,t){var e=!0;for(var n in a)if("undefined"!=typeof a[n]){var s=a[n],i=t[n];void 0!==s&&void 0!==i&&0!==s.length&&0!==i.length&&s!==i&&(e=!1)}return e}function nasa_matching_variations(a,t){for(var e=[],n=0;n0){var e=[];a(".nasa-product-variable-call-ajax").each(function(){a(this).hasClass("nasa-process")||(a(this).addClass("nasa-process"),-1===e.indexOf(a(this).attr("data-product_id"))&&e.push(a(this).attr("data-product_id")))}),e.length>0&&a.ajax({url:t,type:"post",dataType:"json",cache:!1,data:{pids:e},success:function(t){if("undefined"!=typeof t.empty&&"0"===t.empty){for(var e in t.products)a(".nasa-product-variable-call-ajax.nasa-product-variable-"+e).replaceWith(t.products[e]);a(".nasa-product-content-variable-warp").length&&a(".nasa-product-content-variable-warp").each(function(){var t=a(this);a(t).hasClass("nasa-inited")||(a(t).addClass("nasa-inited"),change_content_product_variable(a,t,!1))})}},error:function(){a(".nasa-product-variable-call-ajax").remove()}})}}}function nasa_refresh_attrs(a,t){t.find(".nasa-attr-ux_wrap").each(function(){var t=a(this),e=a(t).attr("data-attribute_name");a('select[name="'+e+'"]').length&&a(t).find(".nasa-attr-ux").each(function(){var t=a(this),n=a(t).attr("data-value");if(a('select[name="'+e+'"]').find('option[value="'+n+'"]').length<=0)a(t).hasClass("nasa-disable")||a(t).addClass("nasa-disable");else{var s=a('select[name="'+e+'"]').find('option[value="'+n+'"]').attr("disabled");"undefined"!=typeof s&&(a(t).hasClass("nasa-unavailable")||a(t).addClass("nasa-unavailable")),a(t).removeClass("nasa-disable")}})})}function nasa_tabs_not_set(a){a(".nasa-tabs-not-set").length&&a(".nasa-tabs-not-set").each(function(){var t=a(this),e=a(t).find(".nasa-tabs"),n=!0;a(t).find(".nasa-panels .nasa-panel").each(function(){var t=a(this),s=a(t).find(".nasa-move-tab-title").html(),i="nasa-tab";n&&(i+=" active first",a(t).addClass("active first"),n=!1),a(e).append('
  • '+s+"
  • "),a(t).find(".nasa-move-tab-title").remove()}),a(e).find(".nasa-tab:last-child").addClass("last"),a(t).removeClass("nasa-tabs-not-set")})}function _isFunction(a){return"function"==typeof a}function nasa_ontouchstart(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}